Emulation of FMA and correctly-rounded sums: proved algorithms using rounding to odd

نویسندگان

  • Sylvie Boldo
  • Guillaume Melquiond
چکیده

Rounding to odd is a non-standard rounding on floating-point numbers. By using it for some intermediate values instead of rounding to nearest, correctly rounded results can be obtained at the end of computations. We present an algorithm for emulating the fused multiply-and-add operator. We also present an iterative algorithm for computing the correctly rounded sum of a set floating-point numbers under mild assumptions. A variation on both previous algorithms is the correctly rounded sum of any three floating-point numbers. This leads to efficient implementations, even when this rounding is not available. In order to guarantee the correctness of these properties and algorithms, we formally proved them using the Coq proof checker.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

When double rounding is odd

Many general purpose processors (including Intel’s) may not always produce the correctly rounded result of a floating-point operation due to double rounding. Instead of rounding the value to the working precision, the value is first rounded in an intermediate extended precision and then rounded in the working precision; this often means a loss of accuracy. We suggest the use of rounding to odd ...

متن کامل

Two-Way Rounding

x n ∈ {0, 1} so that the partial sums ¯ x 1 + · · · + ¯ x k and ¯ x σ1 + · · · + ¯ x σk differ from the unrounded values x 1 + · · · + x k and x σ1 + · · · + x σk by at most n/(n + 1), for 1 ≤ k ≤ n. The latter bound is best possible. The proof uses an elementary argument about flows in a certain network, and leads to a simple algorithm that finds an optimum way to round. Many combinatorial opt...

متن کامل

Parallel Hardware Designs for Correctly Rounded Elementary Functions

This paper presents an algorithm for evaluating the functions of reciprocal, square root, 2, and log2(x) with special purpose hardware. For these functions, the algorithm produces correctly rounded results, according to a specified rounding mode. This algorithm can be used to implement directed rounding which is essential for interval arithmetic, or exact rounding which minimizes the maximum er...

متن کامل

Choosing a Twice More Accurate Dot Product Implementation

The fused multiply and add (FMA) operation computes a floating point multiplication followed by an addition or a subtraction as a single floating point operation. Intel IA-64, IBM RS/6000 and PowerPC architectures implement this FMA operation. The aim of this talk is to study how the FMA improves the computation of dot product with classical and compensated algorithms. The latters double the ac...

متن کامل

Error bounds on complex floating-point multiplication with an FMA

The accuracy analysis of complex floating-point multiplication done by Brent, Percival, and Zimmermann [Math. Comp., 76:1469–1481, 2007] is extended to the case where a fused multiply-add (FMA) operation is available. Considering floating-point arithmetic with rounding to nearest and unit roundoff u, we show that their bound √ 5u on the normwise relative error |ẑ/z − 1| of a complex product z c...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2007